import javax.microedition.lcdui.*;

public class ChatRoom extends Form implements CommandListener, ItemCommandListener {

private TextField chat = new TextField("Nhap noi dung: ", "", 199, TextField.ANY);
private Command send = new Command("Chon", Command.ITEM, 0);
private Command back = new Command("Tro lai", Command.BACK, 0);
private StringItem item = new  StringItem(null, "Gui len", Item.BUTTON);






public ChatRoom() {
super("Phong chat");
this.append(chat);
this.addCommand(send);
this.addCommand(back);
this.setCommandListener(this);
item.setDefaultCommand(send);
item.setItemCommandListener(this);
this.append(item);


}

public void commandAction(Command c, Displayable d) {


if (c == back) {
    
    SetDisplay.setCurrent(SetDisplay.FRIENDSLIST);

}
}

    public void commandAction(Command c, Item item) {
       if (c == send) {
              //
}
    }
}